let user = {
    name: 'John',
    age: 30,

    sayHiInside() {
        alert('Hi, ' + this.name);
    }
};

user.sayHi = function() {
    alert("Hello!");
};

user.sayHi();

user.sayHiInside();

let user2 = {
    firstName: "Ilya",
    sayHi() {
        let arrow = () => alert(this.firstName);
        arrow();
    }
};

user2.sayHi();